import request from '@/utils/request.js'

// 获取文章分类数据
export const getCateListApi = () => {
  return request.get('/my/cate/list')
}
// 添加文章
export const addCateApi = (obj) => {
  return request.post('/my/cate/add', obj)
}
// 更新文章
export const upDateCateApi = obj => {
  return request.put('/my/cate/info', obj)
}
// 删除文章分类
export const deleteCateApi = id => {
  return request.delete('/my/cate/del', { params: { id } })
}
// 发布文章
export const pubArticleApi = fd => request.post('/my/article/add', fd)
// 获取文章列表
export const getArticleApi = (q) => request.get('/my/article/list', { params: q })
// 获取文章详情
export const getArticleDetailApi = (id) => request.get('/my/article/info', { params: { id } })
// 删除文章
export const deleteArticleApi = (id) => request.delete('/my/article/info', { params: { id } })
